package com.qst.rongxiaotong.mapper;


import com.qst.rongxiaotong.aspect.AutoFill;
import com.qst.rongxiaotong.aspect.OperationType;
import com.qst.rongxiaotong.pojo.MyPurchase;
import com.qst.rongxiaotong.pojo.Order;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper {

    List<Order> selectAll();


    List<Order> selectAllGoods(Order order);

    List<Order> selectByKeys(Order order);

    Order selectByPrimaryKey(Integer id);

    @AutoFill(value = OperationType.INSERT)
    void insertSelective(Order order);

    @AutoFill(value = OperationType.UPDATE)
    void updateByPrimaryKeySelective(Order order);

    @Delete("delete from tb_order where order_id=#{id}")
    void deleteByPrimaryKey(Integer id);

    List<MyPurchase> selectBuys(@Param("name") String currentuserName);
}